<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS_练习</title>
    <link rel="stylesheet" href="style.css">
    <style>
        #div1{border:1px solid black;width:200px;height:200px;}
        #div1 div:nth-child(1){width:100px;height:100px;background-color:red;}
        #div1 div:nth-child(2){width:100px;height:100px;background-color:green;}
        #div1 div:nth-child(3){width:100px;height:100px;background-color:blue;}
        #div1 div:nth-child(4){width:100px;height:100px;background-color:yellow;}
        #div1 div:nth-child(2){position:absolute;}
    </style>
</head>
<body>
<div id="div1">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
</div>

</body>
</html>